Hello Dxl community,
I would like to create a "dependent list box". I have two attributes: "Req Type" and "SW Req Type". I want to make "SW Req Type " dependent on "Req Type". The full set of enum values for "Req Type" are the following:
"HW","MECH","SW", "INFO", "DOC"
The full set of enum values for "SW Req Type" are the following:
"Not SW", "SW Info", "SW System", "SW Subsystem"
If I choose "Req Type" as "HW","MECH","INFO", "DOC" ( anything but "SW"), then I would like the list box of enum values for "SW Req Type" to be reduced to the following:
"Not SW", "SW Info"
Currently I have a work around that involves creating a view that shows illegal attribute combinations.( An "illegal" example would be "HW" and "SW System"). However my QA manager wants to filter the set of allowed enum values on "SW Req Type" depending on what was chosen on "Req Type". I tried with DXL attribute but of course this is limited to can generating single non-editable values, AFAIK.
Has anyone any ideas on dynamic attribute lists?
best regards
Colm
MyDeveloerWorks - Thu Mar 06 06:48:37 EST 2014 | |||||||||||
Re: Dependent Attribute lists Hello, I just found a link to a script that offers a neat solution http://www.smartdxl.com/content/?p=395 Thanks Tony Goodman! Does anyone know what we should call the file that is placed in formalPopupFiles ?
| |||||||||||
Re: Dependent Attribute lists A pre-attr-save trigger could disallow an "illegal" change; or present a sub-dialog explaining why and giving you the two options. Yes, you do see the illegal options and first time users won't know not to select one. | |||||||||||
Re: Dependent Attribute lists MyDeveloerWorks - Thu Mar 06 09:01:49 EST 2014 Hello, I just found a link to a script that offers a neat solution http://www.smartdxl.com/content/?p=395 Thanks Tony Goodman! Does anyone know what we should call the file that is placed in formalPopupFiles ?
Hi, I call the file, My_Right_Menu_Items.dxl because it contains the menu items that I put in for my right click menu. But that is just me. For your initial posting, we do something similar using dialog boxes. Once an attribute selection is made, it activates another dialog box element that has the selections based on the first selection. This allows me to change the second one based on the first. It will change the second selection depending if the first selection is a multivalue enumeration, single value enumeration, integer, real or string type. You probably don't need this, but you could make the available selections change depending on the first selection. In reality, the dialog box is set up with a callback function so when the selection is made on the first attribute, the callback calls a function that populates the dialog box element for the second attribute. If you wanted to be real sneaky, you could diable the second one until the first selection is made. I'm much more of a fan of providing dialog boxes to guide the developer on the right selections than trying to make triggers and such to tell them when they did something wrong. Unfortunately, it is hard to get them to use the scripts instead of just directly editing things! Hope this helps, Greg | |||||||||||
Re: Dependent Attribute lists GregM_dxler - Thu Mar 06 16:43:07 EST 2014 Hi, I call the file, My_Right_Menu_Items.dxl because it contains the menu items that I put in for my right click menu. But that is just me. For your initial posting, we do something similar using dialog boxes. Once an attribute selection is made, it activates another dialog box element that has the selections based on the first selection. This allows me to change the second one based on the first. It will change the second selection depending if the first selection is a multivalue enumeration, single value enumeration, integer, real or string type. You probably don't need this, but you could make the available selections change depending on the first selection. In reality, the dialog box is set up with a callback function so when the selection is made on the first attribute, the callback calls a function that populates the dialog box element for the second attribute. If you wanted to be real sneaky, you could diable the second one until the first selection is made. I'm much more of a fan of providing dialog boxes to guide the developer on the right selections than trying to make triggers and such to tell them when they did something wrong. Unfortunately, it is hard to get them to use the scripts instead of just directly editing things! Hope this helps, Greg Hi Greg, Thanks for the advice (to both Greg and Louie) At the moment I cant get a DOORS license to try things. Will try next week and follow up this thread with an answer.
Colm | |||||||||||